<template>
    <view class="container">
        <view class="function-grid">
            <view
                    class="function-item"
                    v-for="(item, index) in frequentlyList"
                    :key="index"
                    @click="$goBack(item.path)"
            >
                <view class="icon-wrapper">
                    <image class="function_img" :src="item.src1" mode="widthFix"></image>
                    <text class="function-text">{{ item.label }}</text>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
  export default {
    data() {
      return {
        frequentlyList: [
          {
            src1: "/static/index/server-root.png",
            label: "营运车辆",
            path: "./statisticalQuery/profitableVehicle",
          },
          {
            src1: "/static/index/server-year.png",
            label: "经营业户",
            path: "./statisticalQuery/pracName",
          },
          {
            src1: "/static/index/server-card.png",
            label: "从业人员",
            path: "./statisticalQuery/ownerName",
          },
          {
            src1: "/static/index/server-normal.png",
            label: "旅游车辆",
            path: "./statisticalQuery/touristVehicle",
          },
          {
            src1: "/static/index/server-card.png",
            label: "旅游企业",
            path: "./statisticalQuery/touristOwner",
          },
          {
            src1: "/static/index/server-normal.png",
            label: "考核管理",
            path: "./statisticalQuery/assessmentManagement",
          },
        ],
      };
    },

    methods: {},
  };
</script>

<style scoped lang="scss">
    .container {
        padding: 10px;
        background-color: #f3f6fa;
        height: 100vh;
        box-sizing: border-box;

        .function-grid {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            margin-top: 20px;

            .function-item {
                display: flex;
                align-items: center;

                justify-content: start;
                width: 48%;
                height: 56px;
                background-color: white;
                border-radius: 4px;
                margin-bottom: 10px;

                /* 虚线边框样式 */
                .function_img {
                    width: 40px;
                    height: 40px;
                }

                .icon-wrapper {
                    margin-bottom: 5px;
                    display: flex;
                    align-items: center;
                    margin-left: 5px;
                    box-sizing: border-box;
                }

                .function-text {
                    font-size: 14px;
                    color: #0d1444;
                    margin-left: 5px;
                }
            }
        }
    }
</style>
